public  abstract class Animal {
    String type;

    // 抽象方法，没有实现
   public  abstract void makeSound();


    public Animal(String type) {
        this.type = type;
    }

    // 具体方法，有实现
    public void eat() {
        System.out.println("This animal eats food.");
    }
}

class Test extends Animal{
    @Override
    public void makeSound() {
        System.out.println("hehe");
    }

    public Test(String type) {
        super(type);
    }



    public static void main(String[] args) {
        Test test=new Test("未知");
        System.out.println(test.type);

    }
}




